package com.xiaoc.bulldozer.common.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xiaoc.bulldozer.common.dao.ConvertTradeOrderMapper;
import com.xiaoc.bulldozer.common.dto.ConvertTradeOrderQueryDto;
import com.xiaoc.bulldozer.common.model.ConvertTradeOrder;
import com.xiaoc.bulldozer.common.service.ConvertTradeOrderService;

/**
 * ConvertTradeOrder Service 实现类
 * 
 * @author Danfo Yam
 * 
 * @date 2018-09-07 16:29:55
 */
@Service("ConvertTradeOrderService")
public class ConvertTradeOrderServiceImpl implements ConvertTradeOrderService {

    @Resource
    private ConvertTradeOrderMapper convertTradeOrderMapper;

    @Override
    public Integer getConvertTradeOrderCountByCondition(ConvertTradeOrderQueryDto convertTradeOrderQueryDto) {
        return convertTradeOrderMapper.getConvertTradeOrderCountByCondition(convertTradeOrderQueryDto);
    }

    @Override
    public List<ConvertTradeOrder> getConvertTradeOrderListByCondition(ConvertTradeOrderQueryDto convertTradeOrderQueryDto) {
        convertTradeOrderQueryDto.setPage(convertTradeOrderQueryDto.getPage());
        return convertTradeOrderMapper.getConvertTradeOrderListByCondition(convertTradeOrderQueryDto);
    }

    @Override
    public ConvertTradeOrder getConvertTradeOrderById(Integer id) {
        return convertTradeOrderMapper.getConvertTradeOrderById(id);
    }

    @Override
    public List<ConvertTradeOrder> getAllConvertTradeOrderList() {
        return convertTradeOrderMapper.getAllConvertTradeOrderList();
    }
    
    @Override
    public void save(ConvertTradeOrder convertTradeOrder) {
        convertTradeOrderMapper.save(convertTradeOrder);
    }
    
    @Override
    public void insert(ConvertTradeOrder convertTradeOrder) {
        convertTradeOrderMapper.insert(convertTradeOrder);
    }

    @Override
    public void update(ConvertTradeOrder convertTradeOrder) {
        convertTradeOrderMapper.update(convertTradeOrder);
    }

    @Override
    public void deleteById(Integer id) {
        convertTradeOrderMapper.deleteById(id);
    }

}
